#ifndef UNIFORMPARAMETERWIDGET_H
#define UNIFORMPARAMETERWIDGET_H

#include <QtOpenGL/QtOpenGL>
#include <cg/cg.h>
#include <cg/cgGL.h>

class UniformParameterWidget : public QGLWidget
{
	Q_OBJECT

public:
	UniformParameterWidget(QWidget *parent = 0);
	~UniformParameterWidget();

protected:
	void initializeGL();
	void resizeGL(int w, int h );
	void paintGL();

private:
	void drawModel();
	void initCG();

	void drawStar(float x , float y , int starPoints , float R , float r);

private:
	//cg variables 
	CGcontext fCgContext;
	CGprogram fCgVertexProgram , fCgFragmentProgram;
	CGprofile fCgVertexProfile , fCgFragmentProfile;
	CGparameter fCgVertexParam_constantColor;

private:
	static const char * fCgProgramName;
	static const char * fCgVertexProgramFileName;
	static const char * fCgVertexProgramName;
	static const char * fCgFragmentProgramFileName;
	static const char * fCgFragmentProgramName;
	
	static void cgCheckForError(const char *situation);

};

#endif // UNIFORMPARAMETERWIDGET_H
